package com.tianyu.inspection.entity;

import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

/**********************************
 * @Author YSW
 * @Description 基础信息
 * @Date 2023/9/11 - 18:57
 **********************************/

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName(autoResultMap = true)
public class BasicInformation {

    @TableId(type = IdType.AUTO)
    private Integer id;

    private Integer parentId;

    private String name;

    @TableField(typeHandler = JacksonTypeHandler.class)
    private JSONObject jsonContent;

    private Integer typeDefId;

    private Integer mapLayerType;

    private Boolean folder;

    private Integer projectId;

    private Integer state;

    private Date createTime;

    private Date modifyTime;

    @TableField(exist = false)
    private List<BasicInformation> children;
}
